﻿using BCCommon;
using BCDto.TMS.User.UserAddressBook;
using BCDto.Website.User;
using System.Collections.Generic;

namespace BCService.TMS.User.UserAddressBook
{
    public interface IUserAddressBookService
    {
        /// <summary>
        /// 添加用户地址薄
        /// </summary>
        /// <param name="userAddressBookRequestDto">用户地址薄信息</param>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        UserAddressBookDto Add(UserAddressBookRequestDto userAddressBookRequestDto, UserDto user);

        /// <summary>
        /// 删除用户地址薄
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <param name="userAddressBookId">用户地址薄Id</param>
        void Delete(UserDto user, long userAddressBookId);

        /// <summary>
        /// 获取用户地址薄
        /// </summary>
        /// <param name="userAddressBookId">用户地址薄Id</param>
        /// <returns></returns>
        UserAddressBookViewDto GetById(long userAddressBookId);

        /// <summary>
        /// 更新用户地址薄
        /// </summary>
        /// <param name="userAddressBookRequestDto">用户地址薄信息</param>
        /// <param name="userAddressBookId">用户地址薄Id</param>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        UserAddressBookDto Update(UserAddressBookRequestDto userAddressBookRequestDto, long userAddressBookId, UserDto user);

        /// <summary>
        /// 获取用户地址薄
        /// </summary>
        /// <param name="userInfo">用户信息</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<UserAddressBookViewDto> Query(UserDto userInfo, int pageIndex, int pageSize);

        /// <summary>
        /// 获取用户地址薄列表
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        IEnumerable<UserAddressBookViewDto> GetList(UserDto user);
    }
}